﻿#include "media/branch/MediaBranchRT.h"
MediaBranchCT::MediaBranchCT(){
    RT_lyricLabel->setAlignment(Qt::AlignCenter);
    RTP_musicLabel->doconfigur_text("音乐");
    RTP_musicLabel->doconfigur_textsetting(QPoint(7, 0));
    RTP_musicLabel->doconfigur_brighttype(NT::DRAWTYPE_RECT);
    RTP_musicLabel->doconfigur_adjustedwidth(true);
    RTP_musicLabel->doconfigur_imgsetting(NT::DRAWTYPE_RECT, NT::PIXLOAD_KEEPRATIO, 3, QPoint(4, 0));
    RTP_musicLabel->doconfigur_pixmapgroup({{MSEVKEY.WIN_NORMAL, ":/PIXMAP/bench/music-guide-dark.png"},
                                            {MSEVKEY.WIN_ENTER,  ":/PIXMAP/bench/music-guide-shallow.png"}});
    RTP_musicLabel->doconfigur_fontgroup({{MSEVKEY.WIN_NORMAL, QFont("KaiTi_GB2312", 10)}});
    RTP_musicLabel->doconfigur_colorgroup({{MSEVKEY.WIN_NORMAL, QColor(116,124,141)},
                                           {MSEVKEY.WIN_ENTER, QColor(234,237,241)}});
    RTP_musicLabel->doconfigur_backcolorgroup({{MSEVKEY.WIN_NORMAL, QColor(234,237,241)},
                                               {MSEVKEY.WIN_ENTER, QColor(116,124,141)}});
    RTP_musicLabel->doconfigur_bordercolorgroup({{MSEVKEY.WIN_NORMAL, QColor(222,225,232)},
                                                 {MSEVKEY.WIN_ENTER, QColor(191,196,210)}});

    RTP_moviesLabel->doconfigur_text("影视");RTP_moviesLabel->setObjectName("666");
    RTP_moviesLabel->doconfigur_textsetting(QPoint(7, 0));
    RTP_moviesLabel->doconfigur_brighttype(NT::DRAWTYPE_RECT);
    RTP_moviesLabel->doconfigur_adjustedwidth(true);
    RTP_moviesLabel->doconfigur_imgsetting(NT::DRAWTYPE_RECT, NT::PIXLOAD_KEEPRATIO, 3, QPoint(4, 0));
    RTP_moviesLabel->doconfigur_pixmapgroup({{MSEVKEY.WIN_NORMAL, ":/PIXMAP/bench/video-guide-dark.png"},
                                             {MSEVKEY.WIN_ENTER,  ":/PIXMAP/bench/video-guide-shallow.png"}});
    RTP_moviesLabel->doconfigur_fontgroup({{MSEVKEY.WIN_NORMAL, QFont("KaiTi_GB2312", 10)}});
    RTP_moviesLabel->doconfigur_colorgroup({{MSEVKEY.WIN_NORMAL, QColor(116,124,141)},
                                            {MSEVKEY.WIN_ENTER, QColor(234,237,241)}});
    RTP_moviesLabel->doconfigur_backcolorgroup({{MSEVKEY.WIN_NORMAL, QColor(234,237,241)},
                                                {MSEVKEY.WIN_ENTER, QColor(116,124,141)}});
    RTP_moviesLabel->doconfigur_bordercolorgroup({{MSEVKEY.WIN_NORMAL, QColor(222,225,232)},
                                                  {MSEVKEY.WIN_ENTER, QColor(191,196,210)}});

    RTP_TbmatchComboBox->d_leftico_pix(":/PIXMAP/bench/search-sharp.png",
                                   ":/PIXMAP/bench/search-lowkey.png");
    RTP_TbmatchComboBox->d_rightico_pix(":/PIXMAP/bench/top-lowkey.png",
                                    ":/PIXMAP/bench/top-sharp.png",
                                    ":/PIXMAP/bench/down-lowkey.png",
                                    ":/PIXMAP/bench/down-sharp.png");
    RTP_TbmatchComboBox->d_filler(QColor(240,243,246));
    RTP_TbmatchComboBox->d_linebackground(QColor(255,255,255));
    RTP_TbmatchComboBox->d_filler_on(NTitleBar::BACKCOLOR, true);

    RTP_mainHint->doconfigur_adjustedwidth(true);
    RTP_mainHint->doconfigur_text("本地媒体");
    RTP_mainHint->doconfigur_textsetting(Qt::AlignBottom | Qt::AlignRight);
    RTP_mainHint->doconfigur_colorgroup({{MSEVKEY.WIN_NORMAL, QColor(15,18,55)}});
    RTP_mainHint->doconfigur_fontgroup({{MSEVKEY.WIN_NORMAL, QFont("Kaiti", 13)}});

    RTP_addHint->doconfigur_adjustedwidth(true);
    RTP_addHint->doconfigur_format("共%1首");
    RTP_addHint->doconfigur_textsetting(Qt::AlignBottom | Qt::AlignRight);
    RTP_addHint->doconfigur_colorgroup({{MSEVKEY.WIN_NORMAL, QColor(15,18,55)}});
    RTP_addHint->doconfigur_fontgroup({{MSEVKEY.WIN_NORMAL, QFont("Kaiti", 9)}});

    RTP_update->doconfigur_adjustedwidth(true);
    RTP_update->doconfigur_pixmap(":/PIXMAP/bench/update-dark.png");
    RTP_update->doconfigur_brighttype(NT::DRAWTYPE_RECT, 4);
    RTP_update->doconfigur_imgsetting(NT::DRAWTYPE_RECT, NT::PIXLOAD_KEEPRATIO, 6);
    RTP_update->doconfigur_backcolorgroup({{MSEVKEY.WIN_ENTER, QColor(222,225,232)}});

    RTP_removeLabel->doconfigur_adjustedwidth(true);
    RTP_removeLabel->doconfigur_pixmap(":/PIXMAP/bench/remove.png");
    RTP_removeLabel->doconfigur_brighttype(NT::DRAWTYPE_RECT, 4);
    RTP_removeLabel->doconfigur_popueway(Qt::LeftButton);
    RTP_removeLabel->doconfigur_imgsetting(NT::DRAWTYPE_RECT, NT::PIXLOAD_KEEPRATIO, 7);
    RTP_removeLabel->doconfigur_backcolorgroup({{MSEVKEY.WIN_ENTER, QColor(222,225,232)}});
    RTP_removeLabel->contentMenu()->addAction(remove_overall);
    RTP_removeLabel->contentMenu()->addAction(remove_onlysql);

    RTP_menuLabel->doconfigur_adjustedwidth(true);
    RTP_menuLabel->doconfigur_pixmap(":/PIXMAP/bench/ignore.png");
    RTP_menuLabel->doconfigur_brighttype(NT::DRAWTYPE_RECT, 4);
    RTP_menuLabel->doconfigur_popueway(Qt::LeftButton);
    RTP_menuLabel->doconfigur_imgsetting(NT::DRAWTYPE_RECT, NT::PIXLOAD_KEEPRATIO, 6);
    RTP_menuLabel->doconfigur_backcolorgroup({{MSEVKEY.WIN_ENTER, QColor(222,225,232)}});

    add_slist->setIcon(QIcon(":/PIXMAP/bench/add-slist.png"));
    RTP_menuLabel->contentMenu()->addAction(add_file);
    RTP_menuLabel->contentMenu()->addAction(add_folder);
    RTP_menuLabel->contentMenu()->addMenu(add_slist);
    RTP_menuLabel->contentMenu()->addAction(batch_media);

    RTP_doallplay->doconfigur_imgsetting(NT::DRAWTYPE_RECT, NT::PIXLOAD_IGNORERATIO_LOWER, 4, QPoint(2,0));
    RTP_doallplay->doconfigur_text("播放全部");
    RTP_doallplay->doconfigur_textsetting(QFont("KaiTi_GB2312", 11), QPoint(5,0));
    RTP_doallplay->doconfigur_brighttype(NT::DRAWTYPE_RECT);
    RTP_doallplay->doconfigur_pixmapgroup({{MSEVKEY.WIN_NORMAL, ":/PIXMAP/bench/play-ico-dark.png"},
                                           {MSEVKEY.WIN_ENTER, ":/PIXMAP/bench/play-ico-shallow.png"}});
    RTP_doallplay->doconfigur_colorgroup({{MSEVKEY.WIN_NORMAL, QColor(116,124,141)},
                                          {MSEVKEY.WIN_ENTER, QColor(234,237,241)}});
    RTP_doallplay->doconfigur_backcolorgroup({{MSEVKEY.WIN_NORMAL, QColor(234,237,241)},
                                              {MSEVKEY.WIN_ENTER, QColor(95,136,105)}});
    RTP_doallplay->doconfigur_bordercolorgroup({{MSEVKEY.WIN_NORMAL, QColor(222,225,232)},
                                                {MSEVKEY.WIN_ENTER, QColor(191,196,210)}});

    Tab_switchTbar->addWidget(RTP_musicLabel);
    Tab_switchTbar->addSeparator();
    Tab_switchTbar->addWidget(RTP_moviesLabel);

    Tab_actionTbar->addWidget(RTP_TbmatchComboBox);
    Tab_actionTbar->addSeparator();
    Tab_actionTbar->addWidget(RTP_update);
    Tab_actionTbar->addSeparator();
    Tab_actionTbar->addWidget(RTP_removeLabel);
    Tab_actionTbar->addSeparator();
    Tab_actionTbar->addWidget(RTP_menuLabel);

    RTP_hintHbox->addWidget(RTP_mainHint);
    RTP_hintHbox->addWidget(RTP_addHint);
    RTP_hintHbox->setSpacing(3);
    RTP_infoVbox->addLayout(RTP_hintHbox);
    RTP_infoVbox->addWidget(RTP_doallplay);
    RTP_infoVbox->setSpacing(4);

    RTP_mainHbox->addLayout(RTP_infoVbox, Qt::AlignBottom | Qt::AlignLeft);
    RTP_mainHbox->addWidget(Tab_switchTbar, 1, Qt::AlignCenter);
    RTP_mainHbox->addWidget(Tab_actionTbar, 0, Qt::AlignVCenter | Qt::AlignRight);

    RTP_mainWidget->setFixedHeight(71);

    RT_mediaTabWidget->setFont(QFont("Kaiti", 10));
    RT_mediaTabWidget->setSelectionMode(QAbstractItemView::SingleSelection);
    RT_mediaTabWidget->setContentsMargins(0, 0, 0, 0);
    RT_mediaTabWidget->setColumnCount(TABLE_COLUMN);
    RT_mediaTabWidget->horizontalHeader()->setVisible(false);
    RT_mediaTabWidget->horizontalHeader()->sectionResizeMode(QHeaderView::Stretch);
    RT_mediaTabWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
    RT_mediaTabWidget->setEditTriggers(QAbstractItemView::EditTrigger::NoEditTriggers);
    RT_mediaTabWidget->verticalHeader()->setVisible(false);
    RT_mediaTabWidget->setShowGrid(false);
    RT_mediaTabWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    RT_mediaTabWidget->setScrollBarWidth(Qt::Vertical, 30);

    LD_cheduhint->doconfigur_textsetting(Qt::AlignCenter, QFont("KaiTi_GB2312", 13));
    LD_cheduhint->doconfigur_adjustedwidth(true);

    LD_chedulewin->doconfigur_secolor(QColor(242,241,247));
    LD_cheduleVbox->addWidget(LD_cheduleBar, 0, Qt::AlignHCenter);
    LD_cheduleVbox->addWidget(LD_cheduhint, 0, Qt::AlignHCenter);
    RT_tabVbox->addWidget(RTP_mainWidget, 0, Qt::AlignTop);
    RT_tabVbox->addWidget(RT_mediaTabWidget, 1);
    RT_tabWidget->doconfigur_secolor({QColor(248,248,255), QColor(248,248,248), QColor(248,248,255)});
    RT_tabWidget->doconfigur_direction(NT::ORIEN_HORIZONTAL);

    RT_mainWidget->setCentralWidget(RT_sliderShow);
};







